package com.example.consumer;

import org.apache.dubbo.config.spring.context.annotation.EnableDubbo;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;

@EnableDubbo
@SpringBootApplication
public class ConsumerApplication {

    public static void main(String[] args) {
        ConfigurableApplicationContext applicationContext = SpringApplication.run(ConsumerApplication.class, args);
        String userName = applicationContext.getEnvironment().getProperty("address");
        String userAge = applicationContext.getEnvironment().getProperty("age");
        System.err.println("user name :" +userName+"; age: "+userAge);

//        SpringApplication.run(ConsumerApplication.class, args);
    }

}
